home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
APPNDL.ARJ
/
APPNDLXL.DOC
next >
Wrap
Text File
|
1992-08-26
|
16KB
|
372 lines
APPNDLXL by Kirk Barrett Software Engineering copyright 1992
APPNDLXL is a program which reads up to 10 text files and appends them
"line by line", with several options, into a new output file. It is useful
for manipulating columnar reports. For example, you could merge two day-
by-day reports into one file, extracting only the columns of interest, or
you could rearrange or delete columns within one report.
QUICK START FOR THOSE WHO WON'T READ A MANUAL
Look at the example control file. Copy it to a new name and edit that file
to create a new control file. Run the program by typing the following from
the DOS prompt:
APPNDLXL controlfile outputfile
EXPLANATION OF SHAREWARE
This program is Shareware. It is not free. If, after trying out the
program, you decide to continue to use it, you are obligated to purchase
the program for $10 from the program's author, Kirk Barrett Software
Engineering, by completing and mailing the following registration form.
Your support is important and greatly appreciated. With it, Shareware
authors are encouraged to design and distribute new products. Without it,
a great deal of high quality, low cost software will cease to be available.
You are encouraged to copy the programs WITH supporting files and share
them freely with others. You have the luxury of trying out the complete
programs, at your own pace and in the comfort of your own home or
workplace. This is not a crippled or "demo" copy, but the complete working
version of the program.
Why you should pay:
* You will receive a disk with our two other shareware programs,
APPNDLXL and STAT, plus a bunch of freeware (see below for a more
thorough explanation)
* Technical support - via mail or Compuserve
* Notification of updates and new products
* Inexpensive upgrade offers or other deals for registered users only
* Your input and ideas help shape future products
* A sense of pride and ownership, in having honestly participated in the
Shareware revolution
* You help to keep software prices down, by supporting a
distribution method which doesn't rely on expensive advertising
campaigns.
Be aware of the following restrictions, designed to protect the community
of Shareware users and authors, and to prevent greedy people from taking
unfair advantage of the trust, hard work, and good will of Shareware
authors:
1. No price or other consideration may be charged for distribution.
However, a distribution cost may be charged for the cost of the diskettes,
shipping, and handling, not to exceed $7 total (equivalent U.S. dollars).
2. The files and programs on the disks may not be modified nor deleted.
3. The programs cannot be sold as part of some other more inclusive
package.
4. The programs cannot be "rented" or "leased" to others.
WARRANTY
There is no warranty of any kind, and the copyright owner is not liable for
damages of any kind. By using this software, you agree to these terms.
The software and documentation are copyright 1992 by
Kirk Barrett Software Engineering
179 Westgate Dr.
Elgin, IL 60123
SHAREWARE SOFTWARE BY KIRK BARRETT SOFTWARE ENGINEERING
123IMPRT-- reads a text file and creates a Lotus-importable file (a "comma
and quote delimited" file) according to a template which you specify.
Works much better than the PARSE command in LOTUS or other spreadsheets.
PARSE-- "quick and dirty" way to create a Lotus-importable file.
APPDNLXL-- APPNDLXL reads up to 10 text files and appends them "line by
line", with several options, into a new output file. It is useful for
manipulating columnar reports. For example, you could merge two day-by-day
reports into one file, extracting only the columns of interest, or you
could rearrange or delete columns within one report.
STAT-- reads a text file containing columns of numbers and computes
statistics on them (sum, average, standard deviation, count, maximum and
minimum).
If you purchase any of these products, you will receive unregistered copies
of the others, plus the following for FREE:
o READSCRN-- reads the current screen and saves it to a file.
o LASRHELP-- a package of batch files which facilitates control
over a HP Laser Jet (set margins, orientation, lines per inch,
lines per page and more).
o ASCII-- displays all characters and their ASCII codes on one
screen.
o GRAFCHAR-- displays all graphic characters and their ASCII codes
in an easy-to-read format.
o FIXFILE-- reads any input file and replaces all non-text
characters with blanks.
APPNDLXL Registration Form
Copyright (c) 1992, Kirk Barrett Software Engineering
Please make checks payable and mail to:
Kirk R. Barrett
179 Westgate Dr.
Elgin, IL
APPNDLXL Registration Fee: $10
Name: _____________________________________________
Company Name: _____________________________________________
Mailing Address
Street: _____________________________________________
Town, State & Zip: _____________________________________________
Phone: ____________________________________________
Do you have a modem? ______________ Disk format ____ 3.50"
____ 5.25"
Where did you receive APPNDLXL from? (Just curious.)
Any comments or suggestions for this or other programs?:
DESCRIPTION OF APPNDLXL
APPNDLXL is a program which reads up to 10 text files and appends them
"line by line", with several options, into a new output file. For the
simplest case (two files), the program reads one line from the first file
and one line from the seconde file. It then appends the line from the
second file to the end of the line from the first file and writes out the
appended line to a new output file. It then reads the next line from the
first and from second file and repeats the process.
A simple example will best explain the general function of the program.
Let's say there are two files, A and B, with the contents as shown below.
File A
111111111111111111
222222222222222222
333333333333333333
444444444444444444
File B
aaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccc
dddddddddddddddddddddddddd
Running APPNDLXL with files A and B as input will produce a third file with
the following contents
111111111111111111aaaaaaaaaaaaaaaaaaaaaaaaaa
222222222222222222bbbbbbbbbbbbbbbbbbbbbbbbbb
333333333333333333cccccccccccccccccccccccccc
444444444444444444dddddddddddddddddddddddddd
The program provides options to select only certain lines in each file and
only certain parts of each line.
You run the program by typing the following from the DOS prompt:
APPNDLXL controlfile outputfile
where controlfile is the name of a "control file" which contains the
input file names and other information and
outputfile is the name of the file that will hold the result
of the line-by-line append.
The control file is a ASCII text file which explains how the input files
should be combined to form the output file. The control file should be
created by a text editor, or most word processors have the ability to save
as a text or ASCII file. The control file consists of a series of lines,
each line corresponding to one input file. The program allows to you
select only certain lines in the input file and only certain part of each
line. So, each control file line specifies which lines in the
corresponding input file should be processed and which columns should be
extracted, along with a couple of other items. (In this context, a
"column" is one character wide. You can determine which columns you want
to extract by editing the input files with a text editor, or with
WordPerfect set to "WordPerfect 4.2 units".)
Information in the control file is specified in a fixed format. Each item
is specified in its own field (a block of columns). The fields are 10
columns wide and start "on the ones" (ie, 21, 31, etc.), except for the
input file name (which is 20 columns wide). The items that must be
specified in each control file line and the fields in which they must
appear are defined by the following generic control line format.
CONTROL LINE FORMAT (The two lines of numbers are not part of the control
file; they are provided as a guide to determine the columns devoted to each
field.)
1 2 3 4 5 6 7 8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
<--input filename--><startlin>< endline><startcol>< endcol ><#Spaces ><PadOnEOF>
where
input filename = name of a text file which serves as input to the
program; all the information on this control file line
refers to this file.
startlin = line number in this file at which to start the append (ie,
lines before start line are not included)
endline = line number in this file at which to end the append (ie,
lines after end line are ignored). If you want to use the
entire file, just make endline a very large number.
startcol = column number for each line in this file at which to start
extracting text
endcol = column number for each line in this file at which to end
extracting text
#Spaces = number of spaces to add after the text that was extracted
from this file
PadOnEOF = indicates, when the end of this file is reached, if the
output file should be padded with a block of spaces where
the extracted text from this file would normally go.
Specify Y if you want to pad, N if you do not.
Note that the information in the control file is column specific. You must
have the correct item in the correct field. The item can appear anywhere
within the field. To aid in placement, you can enter a comment line in the
control file with the first character an asterisk. Here is an example
control file.
1 2 3 4 5 6 7 8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*FileName StartLine EndLine StartCol EndCol #Spaces PadOnEOF
A 5 20 7 9 3 Y
B 1 50 15 30 5 N
This control file specifies that each line in the output file will contain
the text in columns 7 through 9 of file A (starting at line 5 in file A and
ending at line 20), followed by 3 spaces, followed by the text in columns
15-30 of file B (starting at line 1, ending at line 7). If the end of file
A is reached before the required number of lines are read from file B,
then, for ensuing lines in the output file, the block normally occupied by
the text of file A will be padded with blanks.
You may include the same input file more than once in the control file.
However, if you do so, the start line must be the same for every instance
of the file. Using the same file more than once allows you to do things
like rearranging columns or deleting columns.
USER SUPPORT
If you have a problem or suggestion, write to the above address. I will
try to respond as soon as possible. I will be happy to modify the program
for you on a contract basis.
EXTENDED EXAMPLE
Here is a scenario in which this program would be useful. Let's say you
run a small concession stand selling ice cream, hot dogs, coffee, etc. Say
you want to know how your sales are affected by the weather. From your own
records, you have the following daily report of sales of each item
(included as SALES.TXT):
1 2 3 4 5 6 7
1234567890123456789012345678901234567890123456789012345678901234567890
Sales in Dollars
Day Ice Cream Coffee Hot Dogs
07/01/91 125 125 125
07/02/91 200 200 200
07/03/91 130 130 130
07/04/91 868 958 872
. . . .
. . . .
. . . .
07/30/91 88 146 924
07/31/91 187 189 245
From the weather service, you obtain a daily report of rainfall and high
and low temperatures, like this (included as WEATHER.TXT):
1 2 3 4 5 6 7
1234567890123456789012345678901234567890123456789012345678901234567890
Hi Lo
Rainfall Temperature Temperature
Day inches Deg F Deg F
07/01/91 80 60
07/02/91 81 61
07/03/91 0.5 78 58
07/04/91 0.2 90 70
. . . .
. . . .
. . . .
07/30/91 73 53
07/31/91 71 51
To merge these two file, use this control file (included as CONTROL.TXT):
*FileName StartLine EndLine StartCol EndCol #Spaces Pad
SALES.TXT 1 1000 1 38 3 Y
WEATHER.TXT 1 1000 12 43 3 Y
Then enter this command from the DOS prompt:
APPNDLXL CONTROL.TXT OUTPUT.TXT
This creates this output file (OUTPUT.TXT):
Sales in Dollars Hi Lo
Rainfall Temperature Temperature
Day Ice Cream Coffee Hot Dogs inches Deg F Deg F
07/01/91 125 125 125 80 60
07/02/91 200 200 200 81 61
07/03/91 130 130 130 0.5 78 58
07/04/91 868 958 872 0.2 90 70
. . . . . . .
. . . . . . .
. . . . . . .
07/30/91 88 146 924 73 53
07/31/91 187 189 245 71 51
You could then use our other shareware program, 123IMPRT, to import this
data into your spreadsheet. 123IMPRT is much easier to use than the LOTUS
parse command.OTHER SHAREWARE SOFTWARE BY KIRK BARRETT SOFTWARE ENGINEERING
123IMPRT-- reads a text file and creates a Lotus-importable file (a "comma
and quote delimited" file) according to a template which you specify.
Works much better than the PARSE command in LOTUS or other spreadsheets.
WARRANTY
There is no warranty of any kind, and the copyright owner is not liable for
damages of any kind. By using this software, you agree to this.
The software and documentation are copyright 1992 by
Kirk Barrett Software Engineering
179 Westgate Dr.
Elgin, IL 60123